package org.bookie.stateful;

import java.util.HashMap;

/**
 * Provides storage for stateful (long-lived) services. 
 * Implementation of given service provided in the module complete fake
 * because it can not do anything but store listeners in the internal
 * {@link HashMap} and retrieve it from there.
 * More advanced implementations (e.g. that are using HttpSession) will be
 * contributed from another modules, for example TapestryHoneycomb integration
 * 
 * @author Marcus Schulte
 */
public interface ClientStateStorage {
	
	/**
	 * store a service.
	 * 
	 * @param key
	 * @param obj
	 */
	void store( String key, StateStorageClearanceListener obj);
	
	/**
	 * retrieve a service.
	 * 
	 * @param key
	 * @return
	 */
	StateStorageClearanceListener retrieve( String key );

}
